import service from "../utils/request";

export function ListHots() {
    return service({
        url: '/film/hot',
        method: 'get'
    })
}

export function ListAllFilm() {
    return service({
        url: '/film/getAll',
        method: 'get'
    })
}

export function SearchFilm(name) {
    return service({
        url: '/film/name/' + name,
        method: 'get'
    })
}

export function FindFilmByRegionAndType(typeName) {
    return service({
        url: '/type/findByTypeName?typeName='+typeName,
        method: 'get'
    })
}

export function FindFilmById(id) {
    return service({
        url: '/film/findById?id=' + id,
        method: 'get'
    })
}

export function AddFilmEvaluate(data) {
    return service({
        url: '/comment/userAddComment',
        method: 'post',
        data: data
    })
}


export function FindAllArrangement() {
    return service({
        url: '/arrangement',
        method: 'get'
    })
}


export function FindFilmEvaluateByFId(id) {
    return service({
        url: '/comment/showAllComment?id=' + id,
        method: 'get'
    })
}


export function FindArrangements(id) {
    return service({
        url: "/arrangement/findFilmId?id=" + id,
        method: "get"
    })
}

export function FindArrangementById(id) {
    return service({
        url: "/arrangement/findFilmId?id=" + id,
        method: "get"
    })
}

export function GetArrangementSeats(id) {
    return service({
        url: "/arrangement/getSeat?id=" + id,
        method: "get"
    })
    
}